/*
    Down In Front: The Android Application
    This application is an interface for Down In Front commentaries.
    Copyright (C) 2011
    Holden Hill <holdenhill@gmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package down.in.front;

/**
 * The object that stores each commentary's information. This includes
 * everything stored in the online database to allow for expandability of
 * features in the future. Each episode is populated by parsing a JSON feed
 * generated on the Down In Front server.
 * 
 * @author Holden Hill <holdenhill@gmail.com>
 * 
 */
public class Episode {
	int id = 0;
	String title = "";
	String commentators = "";
	String description = "";
	String tags = "";
	String audio = "";
	String background = "";
	String poster = "";

	/**
	 * @param n
	 *            The id associated with this episode.
	 * @param t
	 *            The title of the episode.
	 * @param c
	 *            The commentators for this episode.
	 * @param d
	 *            The episode's description.
	 * @param g
	 *            The tags for searching.
	 * @param l
	 *            The link to the audio file.
	 * @param i
	 *            The background image for the episode.
	 * @param p
	 *            The poster image associated with this episode for the archive.
	 */
	public Episode(int n, String t, String c, String d, String g, String l,
			String i, String p) {

		id = n;
		title = t;
		commentators = c;
		description = d;
		tags = g;
		audio = l;
		background = i;
		poster = p;
	}

	/**
	 * Returns the id of the episode.
	 * 
	 * @return An integer containing the episode ID.
	 */
	public int getID() {
		return id;
	}

	/**
	 * Returns the episode's title.
	 * 
	 * @return A String containing the title.
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * Returns the commentators for this episode.
	 * 
	 * @return A String containing each commentator.
	 */
	public String getCommentators() {
		return commentators;
	}

	/**
	 * Returns the description of this episode.
	 * 
	 * @return A String containing the episode's description.
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Returns the tags for this episode. This will allow for searching in a
	 * future update.
	 * 
	 * @return A String containing the list of tags, each separated by a comma.
	 */
	public String getTags() {
		return tags;
	}

	/**
	 * Returns the URL of the mp3 file for playback.
	 * 
	 * @return A String containing the URL for the mp3 file on the server.
	 */
	public String getPlayerLink() {
		return audio;
	}

	/**
	 * Returns the URL of the background image for each episode.
	 * 
	 * @return A String containing the URL of the background image on the
	 *         server.
	 */
	public String getBackgroundLink() {
		return background;
	}

	/**
	 * Returns the URL of the poster image for each episode. This is used in the
	 * archive view.
	 * 
	 * @return A String containing the URL of the poster image on the server.
	 */
	public String getPosterLink() {
		return poster;
	}

	/**
	 * Sets the ID of the episode.
	 * 
	 * @param n
	 *            An integer with the episode's ID.
	 */
	public void setID(int n) {
		id = n;
	}

	/**
	 * Sets the title of the episode.
	 * 
	 * @param t
	 *            A String containing the episode's title.
	 */
	public void setTitle(String t) {
		title = t;
	}

	/**
	 * Sets the commentators for the episode.
	 * 
	 * @param c
	 *            A String containing the episode's commentators, each separated
	 *            by a comma.
	 */
	public void setCommentators(String c) {
		commentators = c;
	}

	/**
	 * Sets the description of the episode.
	 * 
	 * @param d
	 *            A String containing the episode's description.
	 */
	public void setDescription(String d) {
		description = d;
	}

	/**
	 * Sets the tags associated with the episode.
	 * 
	 * @param t
	 *            A String containing the tags for this episode, each separated
	 *            by a comma.
	 */
	public void setTags(String t) {
		tags = t;
	}

	/**
	 * Sets the URL for the episode's MP3 file on the server.
	 * 
	 * @param a
	 *            String containing the URL for the episode's MP3 file.
	 */
	public void setPlayerLink(String a) {
		audio = a;
	}

	/**
	 * Sets the URL for the episode's background image on the server.
	 * 
	 * @param b
	 *            String containing the URL for the episode's background image
	 *            file.
	 */
	public void setBackgroundLink(String b) {
		background = b;
	}

	/**
	 * Sets the URL for the episode's poster image on the server.
	 * 
	 * @param p
	 *            String containing the URL for the episode's poster image file.
	 */
	public void setPosterLink(String p) {
		poster = p;
	}
}
